package org.edu.modules.jxzy.service.impl;

import org.edu.modules.jxzy.entity.JwJiaocaiSupplier;
import org.edu.modules.jxzy.mapper.JwJiaocaiSupplierMapper;
import org.edu.modules.jxzy.service.IJwJiaocaiSupplierService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.Arrays;
import java.util.List;

/**
 * @Description: 教材供应商表
 * @Author: jeecg-boot
 * @Date:   2021-04-14
 * @Version: V1.0
 */
@Service
public class JwJiaocaiSupplierServiceImpl extends ServiceImpl<JwJiaocaiSupplierMapper, JwJiaocaiSupplier> implements IJwJiaocaiSupplierService {

    @Override
    public void updateStatusByIds(String ids,int status) {
        List<String> list = Arrays.asList(ids.split(","));
        for (String str:list) {
            baseMapper.updateById(new JwJiaocaiSupplier().setId(Integer.parseInt(str)).setStatus(status));
        }
    }
}
